{% extends "base.html" %}

{% block title %}修改密码{% endblock %}

{% block content %}
<div class="container mt-4">
    <div class="card border-primary">
        <div class="card-header bg-primary text-white">
            <h4><i class="bi bi-key"></i> 修改银行卡密码</h4>
        </div>
        <div class="card-body">
            <form method="POST">
                <div class="mb-3">
                    <label class="form-label">选择银行卡</label>
                    <select class="form-select" name="card_id" required>
                        {% for card in cards %}
                        <option value="{{ card.cardID }}">
                            {{ card.cardID }} ({{ card.savingName }})
                        </option>
                        {% endfor %}
                    </select>
                </div>
                <div class="mb-3">
                    <label class="form-label">当前密码</label>
                    <input type="password" class="form-control" name="old_password" required>
                </div>
                <div class="mb-3">
                    <label class="form-label">新密码</label>
                    <input type="password" class="form-control" name="new_password" required>
                </div>
                <div class="mb-3">
                    <label class="form-label">确认新密码</label>
                    <input type="password" class="form-control" name="confirm_password" required>
                </div>
                <div class="alert alert-info">
                    <i class="bi bi-info-circle"></i>
                    密码要求：至少6位字符，建议使用字母和数字组合
                </div>
                <button type="submit" class="btn btn-primary">
                    <i class="bi bi-check-circle"></i> 确认修改
                </button>
                <a href="{{ url_for('customer_dashboard') }}" class="btn btn-secondary">取消</a>
            </form>
        </div>
    </div>
</div>
{% endblock %}